home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Graphics / PerfectPaint / rexx / Anim / Operators / Spray < prev    next >
Encoding:
Text File  |  2001-03-31  |  861 b   |  61 lines

  1. /* Effect Operators Mosaic
  2. 000
  3. */
  4.  
  5.     call addlib("rexxmathlib.library", 5, -30, 0)
  6.  
  7.     options results
  8.  
  9.     parse ARG Port Opt1 Opt2 Opt3 s0 t0 s1 t1 b
  10.     
  11.     ADDRESS value Port
  12.  
  13.     pp_GetWidth
  14.     w=result
  15.     pp_GetHeight
  16.     h=result
  17.     pp_GetDepth
  18.     D=result
  19.  
  20.         pp_ComposeReqOff        
  21.         pp_GetCurrentBrush
  22.         CB=result
  23.         pp_FindEmptyBrush
  24.         Brush=result
  25.         pp_SetBrush Brush
  26.         pp_GotoFrame s1
  27.         pp_PicttoSpare
  28.         pp_GotoFrame s0            
  29.         pp_Pickbrush 0 0 W H
  30.  
  31.         step=(s1-s0)
  32.         Step_f=100/Step
  33.         pp_Spray 2 0
  34.         pp_EffectOn
  35.         DO i=s0 to s1
  36.             IF t1=1 then DO
  37.                 pp_GotoFrame (s1+i-s0)
  38.                 pp_PicttoSpare
  39.             END
  40.             pp_GotoFrame i
  41.             if t0=0 then DO
  42.                 pp_EffectOff
  43.                 pp_plot W/2 H/2
  44.                 pp_EffectOn
  45.             END
  46.             f=Step_f*(i-s0)
  47.             pp_Spray 2 f
  48.             pp_boxf 0 0 W H
  49.         END
  50.         pp_FreeBrush
  51.         pp_SetBrush CB
  52.  
  53.         pp_Gotoframe s0
  54.         pp_FreeBrush
  55.         pp_SetBrush CB
  56.  
  57.         pp_EffectOff
  58.         pp_ComposeReqOn    
  59.  
  60.     EXIT
  61.